home *** CD-ROM | disk | FTP | other *** search
/ GameSpot.it / GameSpot Italia (2001).bin / demo / severancedemo / data1.cab / Program_Files / Maps / Ragnar_M2 / RagnarActions.py < prev    next >
Text File  |  2000-10-13  |  7KB  |  245 lines

  1. import def_class
  2. import Bladex
  3. import Enm_Def
  4. import EnemyTypes
  5. import AuxFuncs
  6. import B3DLib
  7. import ItemTypes
  8. import AniSound
  9. import Reference
  10. import Combat
  11. import copy
  12. import Actions
  13. import pocimac
  14. import GameText
  15. import Ontake
  16. import Breakings
  17.  
  18.  
  19. GameText.SetLanguage("Spanish")
  20.  
  21. _Pasito=Bladex.CreateSound("..\\..\\Sounds\\paso-piedra-reverb-1.wav","Pasito")
  22. _Pasito.MinDistance =  50000
  23. _Pasito.MaxDistance =  5000
  24. _Pasito.Volume      =  1.0
  25.  
  26.  
  27. _Pasito1=Bladex.CreateSound("..\\..\\Sounds\\paso-piedra-reverb-2.wav","Pasito1")
  28. _Pasito1.MinDistance =  50000
  29. _Pasito1.MaxDistance =  5000
  30. _Pasito1.Volume      =  1.0
  31.  
  32.  
  33. #dialogoragnar=Bladex.CreateSound("..\\..\\Sounds\\ragnar1.wav", "DialogoRagnar")
  34. #dialogoragnar.Volume=1
  35. #dialogoragnar.Scale=3.41
  36. #dialogoragnar.MinDistance=5000
  37. #dialogoragnar.MaxDistance=150000
  38.  
  39. cuchillasactivadas=Bladex.CreateSound("..\\..\\Sounds\\trap-clicked.wav", "CuchillasActivadas")
  40. cuchillasactivadas.Volume=1
  41. cuchillasactivadas.Scale=3.41
  42. cuchillasactivadas.MinDistance=5000
  43. cuchillasactivadas.MaxDistance=25000
  44.  
  45. matadle=Bladex.CreateSound("..\\..\\Sounds\\kill-him.wav", "Matadle")
  46. matadle.Volume=1
  47. matadle.Scale=1.0
  48. matadle.MinDistance=10000
  49. matadle.MaxDistance=100000
  50.  
  51. graznidocuervo=Bladex.CreateSound("..\\..\\Sounds\\raven-call.wav", "GraznidoCuervo")
  52. graznidocuervo.Volume=1
  53. graznidocuervo.Scale=3.41
  54. graznidocuervo.MinDistance=5000
  55. graznidocuervo.MaxDistance=50000
  56.  
  57.  
  58. sectorsonidocuchillas=Bladex.GetSector(-137500.0, -23263.0, -93000.0)
  59. sectorsonidocuchillas.OnEnter=SonidoActivacion
  60.  
  61.  
  62. #########################################
  63. #     Definicion de la clase Ragnar     #
  64. #########################################
  65.  
  66.  
  67. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Rgn_escape.bmv","Rgn_escape",1,"Ragnar")
  68. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Rgn_escape2.bmv","Rgn_escape2",1,"Ragnar")
  69.  
  70.  
  71. ##################
  72. #     Ragnar     #
  73. ##################
  74.  
  75. ragnar=Bladex.CreateEntity("Ragnar","Ragnar", 0.0, 0.0, 0.0,"Person")
  76. ragnar.Angle=0.0
  77. ragnar.ActionAreaMin=0
  78. ragnar.ActionAreaMax=0
  79. EnemyTypes.EnemyDefaultFuncs(ragnar)
  80. ragnar.Level=4
  81. ragnar.Deaf=1
  82.  
  83.  
  84. espadaragnar=Bladex.CreateEntity("EspadaRagnar","Espadaromana",0,0,0,"Weapon")
  85. ItemTypes.ItemDefaultFuncs(espadaragnar)
  86. Actions.TakeObject(ragnar.Name,"EspadaRagnar")
  87.  
  88. escudoragnar=Bladex.CreateEntity("EscudoRagnar","Escudo1",0,0,0)
  89. ItemTypes.ItemDefaultFuncs(escudoragnar)
  90. Actions.TakeObject(ragnar.Name,"EscudoRagnar")
  91.  
  92. potion=Bladex.CreateEntity("RagnarsPotion","Pocima100",0,0,0)
  93. potion.Static=0
  94. potion.Solid=1
  95. potion.Scale=1.220190
  96. pocimac.CreatePotion("RagnarsPotion")
  97. Actions.TakeObject(ragnar.Name,"RagnarsPotion")
  98. Actions.TakeObject(ragnar.Name,"llaverag")
  99.  
  100.  
  101. inv=ragnar.GetInventory()
  102. inv.LinkRightHand("EspadaRagnar")
  103. inv.LinkLeftHand("EscudoRagnar")
  104. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Rgn_rlx_1h.bmv","Rgn_rlx_1h",1,"Ragnar")
  105.  
  106.  
  107. ##########################
  108. #     Guardaespaldas     #
  109. ##########################
  110.  
  111. guarda1=Bladex.CreateEntity("Guarda1","Knight_Traitor", 0.0, 0.0, 0.0)
  112. guarda1.Person=1
  113. guarda1.Level=3
  114. guarda1.Angle=0.0
  115. guarda1.ActionAreaMin=0
  116. guarda1.ActionAreaMax=0
  117. EnemyTypes.EnemyDefaultFuncs(guarda1)
  118. guarda1.Blind=1
  119. guarda1.Deaf=1
  120.  
  121.  
  122. espadaguarda1=Bladex.CreateEntity("RagnarEspadaGuarda1","Hacha",0,0,0,"Weapon")
  123. ItemTypes.ItemDefaultFuncs(espadaguarda1)
  124. Actions.TakeObject(guarda1.Name, espadaguarda1.Name)
  125.  
  126. escudoguarda1=Bladex.CreateEntity("RagnarEscudoGuarda1","Escudo5",0,0,0)
  127. ItemTypes.ItemDefaultFuncs(escudoguarda1)
  128. Actions.TakeObject(guarda1.Name, escudoguarda1.Name)
  129.  
  130. inv=guarda1.GetInventory()
  131. inv.LinkRightHand(espadaguarda1.Name)
  132. inv.LinkLeftHand(escudoguarda1.Name)
  133. Actions.TakeObject(guarda1.Name,"llave10")
  134.  
  135. guarda2=Bladex.CreateEntity("Guarda2","Knight_Traitor", 0.0, 0.0, 0.0)
  136. guarda2.Person=1
  137. guarda2.Level=3
  138. guarda2.Angle=0.0
  139. guarda2.ActionAreaMin=0
  140. guarda2.ActionAreaMax=0
  141. EnemyTypes.EnemyDefaultFuncs(guarda2)
  142. guarda2.Blind=1
  143. guarda2.Deaf=1
  144.  
  145.  
  146. espadaguarda2=Bladex.CreateEntity("RagnarEspadaGuarda2","Gladius",0,0,0,"Weapon")
  147. ItemTypes.ItemDefaultFuncs(espadaguarda2)
  148. Actions.TakeObject(guarda2.Name, espadaguarda2.Name)
  149.  
  150. escudoguarda2=Bladex.CreateEntity("RagnarEscudoGuarda2","Escudo2",0,0,0)
  151. ItemTypes.ItemDefaultFuncs(escudoguarda2)
  152. Actions.TakeObject(guarda2.Name, escudoguarda2.Name)
  153.  
  154.  
  155. inv=guarda2.GetInventory()
  156. inv.LinkRightHand(espadaguarda2.Name)
  157. inv.LinkLeftHand(escudoguarda2.Name)
  158.  
  159.  
  160.  
  161. ################################
  162. #     Posiciones iniciales     #
  163. ################################
  164.  
  165. ragnar.Position=-142500.0, -12750.0, -110700.0
  166. guarda1.Position=-141000.0, -12750.0, -108000.0
  167. guarda2.Position=-144250.0, -12750.0, -106500.0
  168.  
  169. ragnar.SetOnFloor()
  170. guarda1.SetOnFloor()
  171. guarda2.SetOnFloor()
  172.  
  173. ##################################################
  174. #     Ragnar enviando dos enemigos y huyendo     #
  175. ##################################################
  176.  
  177. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Tkn_rlx_f.bmv","Tkn_rlx_f",1,"Knight_Traitor")
  178.  
  179.  
  180. ragnar.SeeFunc=RagnarVeJugadorEnemigos
  181.  
  182.  
  183. Ontake.AddOnTakeEvent("PergaminoFin",FundidoFin)
  184.  
  185.  
  186. ########################################
  187. #     Aparicion de Ragnar al final     #
  188. ########################################
  189.  
  190. Bladex.AddParticleGType("RgDoorDust","SmokeParticle",B_PARTICLE_GTYPE_BLEND,40)
  191.  
  192. for i in range(40):
  193.     if i>20:
  194.         traux=0.0
  195.     else:
  196.         traux=((20.0-i)/20.0)**0.5
  197.     aux=((40.0-i)/40.0)**0.5
  198.     r=255
  199.     g=230
  200.     b=210
  201.     a=60.0*(1.0-traux)
  202.     size=7.0+aux*700.0
  203.     Bladex.SetParticleGVal("RgDoorDust",i,r,g,b,a,size)
  204.  
  205.     
  206.     
  207. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Rgn_rlx_f.bmv","Rgn_rlx_f",1,"Ragnar")
  208.  
  209. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Rgn_end_ragnar.BMV","Rgn_end_ragnar_ragnar",1,"Ragnar")
  210.  
  211.         
  212.  
  213. sectorfinragnar=Bladex.GetSector(-142500.0, -31750.0, -98800.0)
  214. sectorfinragnar.OnEnter=EntraHabitacionFinal
  215.  
  216.  
  217. ###################
  218. #     Cuervos     #
  219. ###################
  220.  
  221. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Crw_act10.BMV","Crw_act10",1,"Crw")
  222. #Bladex.LoadSampledAnimation("..\\..\\Anm\\Crw_act11.BMV","Crw_act11",1,"Crw")
  223.  
  224. cuervovolando1=Bladex.CreateEntity("CuervoVolando1", "Crw", -137120.0, -42000.0, -98435.0)#-107190.0)
  225. cuervovolando1.Static=1
  226. #cuervovolando1.Orientation=0.430459,0.430459,0.560986,-0.560986
  227. cuervovolando1.Orientation=0.555685,0.555685,-0.437281,0.437281
  228. cuervovolando1.Actor=1
  229. cuervovolando1.Animation="Crw_act10"
  230. cuervovolando1.FPS=20.0
  231. cuervovolando1.SendSectorMsgs=0
  232.  
  233. cuervovolando2=Bladex.CreateEntity("CuervoVolando2", "Crw", -129956.0, -43770.0, -107190.0)#-98435.0)
  234. cuervovolando2.Static=1
  235. #cuervovolando2.Orientation=0.555685,0.555685,-0.437281,0.437281
  236. cuervovolando2.Orientation=0.430459,0.430459,0.560986,-0.560986
  237. cuervovolando2.Actor=1
  238. cuervovolando2.Animation="Crw_act11"
  239. cuervovolando2.FPS=20.0
  240. cuervovolando2.SendSectorMsgs=0
  241.  
  242.  
  243. sectorantesfinragnar=Bladex.GetSector(-142263.0, -29765.0, -89773.0)
  244. sectorantesfinragnar.OnEnter=ActivaCuervosVolando
  245.